#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include"martix.h"
#include <QPainter>
#include <QPaintEvent>
#include<QLineEdit>

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

protected:
    void paintEvent(QPaintEvent* event);
    void keyPressEvent(QKeyEvent* event);
private slots:
    void on_pushButton_5_clicked();

    void on_comboBox_currentIndexChanged(int index);

    void on_comboBox_2_currentIndexChanged(int index);

    void on_pushButton_clicked();

    void on_pushButton_4_clicked();

    void on_pushButton_9_clicked();

    void on_pushButton_10_clicked();

    void on_pushButton_3_clicked();

    void on_pushButton_11_clicked();

    void on_pushButton_7_clicked();

    void on_pushButton_6_clicked();

    void on_pushButton_2_clicked();

    void on_pushButton_8_clicked();

    void on_pushButton_12_clicked();

    void on_pushButton_13_clicked();

private:
    Ui::MainWindow *ui;
    martix* A;
    int indexi;
    int indexj;
    martix* B;
    void resetij(){indexi=0;indexj=0;}
    void printA();
    bool targetB;
    void printB();
    void setLimit(QLineEdit*);
    void printC();
};
#endif // MAINWINDOW_H
